home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
amac44c.zip
/
RFR006.QM
< prev
next >
Wrap
Text File
|
1992-05-27
|
11KB
|
246 lines
* rfr006.qm
* Macro To Replace "Period Space" With "Period Two Spaces", and Misc
* Written By Tom Hogshead
* [ See RFRMxx.QM For Use ]
* 5/30/92
* Key Subfile Description
* ===== ============== ====================================================
* @3 --Rplc "Period Space" w/"Period Two Spc" In Block ( )
* @4 --Remove "Period Two Spaces" From Block
*
* Rplc "Period Space" w/"Period Two Spc" In Para,
* Reformats Paragraph
* @0 ├─ Long Version, Cannot Exceed Right Margin <BEST>
* @1 └─ Short Version, Can Exceed Right Margin
*
* @5 --Remove "Period Two Spaces" from Paragraph,
* Reformats Paragraph
*--
* @f3 --Copy Char At Cursor To Line Below
* @f4 Insert Space At Cursor And Move Down To Next Line
* @f5 └─ (Alternate to @f4 Independent of Insert Status)
* @f6 --Deletes Char At The Cursor Move Down To Next Line
* @f7 --Move Block, Fill Old Block With Blanks
*
* {e:\up\RFRM*}--Return To RFRMxx.QM
*
*-- eoi
*
* --------------------------------------------------------------------------
* @(0) Replace "Period Space" with "Period Two Spaces" and Format Paragraph,
* Long Version Will Fit Qconfig.dat, Cannot Exceed Right Margin
* --------------------------------------------------------------------------
* See discussion of @1 below.
* The formatted paragraph will not exceed the right margin with @0
* because no extra space is added for each period after formatting. An
* alternate shorter version is @1 which can exceed right margin. Ascii
* #173 cannot exist in file.
@0 macrobegin
setscreenoff
savesettings setsoundoff setautoindentmode
setwordwrapmode togglewordwrap
cursordown prevpara begline
unmarkblock markcharacter endpara markcharacter gotoblockbeg
find "." return "L" return
1: cursorright isendline jfalse 2 #173 2: repeatfind jtrue 1
gotoblockbeg
findreplace "." " " return "." " " return "LN" return
findreplace "." " " return "." #173 " " return "LN" return
wrappara
findreplace #173 return " " return "GN" return
unmarkblock nextpara makectrofscreen restoresettings
*
* 90 bytes Fri 12-06-1991 01:17:05 (TH @0, to ALL #3/792)
* Remove asterisks, format to a right margin of 500, and use joinline
* to fit on one line of qconfig.dat:
* @0 MacroBegin SetScreenOff SaveSettings SetSoundOff
* SetAutoIndentMode SetWordWrapMode ToggleWordWrap CursorDown
* PrevPara BegLine UnmarkBlock MarkCharacter EndPara
* MarkCharacter GotoBlockBeg Find "." Return "L" Return 1:
* CursorRight isEndLine JFalse 0: #173 0: RepeatFind
* JTrue 1: GotoBlockBeg FindReplace ". " Return ". " Return
* "LN" Return FindReplace ". " Return "." #173 " " Return "LN"
* Return WrapPara FindReplace #173 Return " " Return "GN" Return
* UnmarkBlock NextPara MakeCtrOfScreen RestoreSettings
*
* 90 bytes Fri 12-06-1991 01:17:05 (TH @0, to ALL #3/792)
*
* --------------------------------------------------------------------------
* @(1) Replace "Period Space" with "Period Two Spaces" and Format Paragraph
* Short Version To Fit Qconfig.dat, Can Exceed Right Margin
* --------------------------------------------------------------------------
* This macro will replace all 'period one spaces' a paragraph with
* 'period two spaces' in the paragraph in which the cursor resides. The
* paragraph is also reformatted to the current right margin setting.
* If the cursor is positioned between paragraphs, the previous
* paragragh is processed. The cursor ends on the first character of
* the paragraph following the processed paragraph. This macro will fit
* on one line of qconfig.dat, and may be used to replace @b, wrappara,
* in q.exe as configured. Use @5 in rfr003.qm to remove all 'period
* two spaces' in a paragraph. This macro requires Qedit v2.15 and is
* modification to a macro originally written by Tim Farley to do the
* same thing in SemWare Conference 21, Message #3433, 1/18/91.
* The formatted paragraph may exceed the right margin with @1 because
* one extra space is added for each period after formatting. An
* alternate longer version is @0 which will not exceed right margin but
* will not fit on one line of qconfig.dat.
@1 macrobegin
setscreenoff savesettings setsoundoff
cursordown prevpara begline
unmarkblock markcharacter wrappara markcharacter gotoblockbeg
findreplace "." " " return "." " " return "LN" return
findreplace "." " " return return "LN" return *|
gotoblockend unmarkblock nextpara makectrofscreen restoresettings
*
* 54 bytes Fri 01-18-1991 21:23:45 (TF #21/3433)
* 60 bytes Mon 12-02-1991 14:25:32 (TH @1, mod to TF #21/3433 for v2.15)
* 67 bytes Tue 12-03-1991 22:43:55 (TH @1, modified to not exceed rt mrgn)
* 67 bytes Tue 12-03-1991 22:43:55 (TH @1, #24/635)
* 62 bytes Thu 12-05-1991 15:32:25 (TH @1, added nextpara/makectrofscreen)
* 60 bytes Thu 12-05-1991 18:38:02 (TH @1, removed jfalse END/added begline)
* 60 bytes Thu 12-05-1991 18:38:02 (TH @1, to ALL #3/792)
* 54 bytes Wed 12-11-1991 17:37:45 (TH @1, shortened |)
*
* ----------------------------------------------------------------------
* @(3) Replace "Period Space" w/ "Period Space Space" In Block
* ----------------------------------------------------------------------
* This macro replaces 'period space' with period two spaces" in a
* marked block or a user selected block. If a block is marked before
* invoking this macro, either open or closed, it will be processed
* without pause. If no block is marked, the macro pauses for the user
* to select the block end by cursoring to end of desired block and
* pressing <enter>. Requires QEdit v2.15.
* Test. Test. Test
* Test. Test. Test
@3 macrobegin
* --------------------------- Select Block ---------------------------*
gotoblockend jtrue A markline gotoblockend jtrue OK pause jump B
A: gotoblockbeg unmarkblock markline prevposition
B: markline
OK: setscreenoff
* --------- Replace "Period Space' With 'Period Two Spaces' ---------*
gotoblockbeg begline
findreplace "." " " return "." " " return "N" return
findreplace "." " " return return "N" return
unmarkblock
*
* 56 bytes Mon 05-18-1992 17:36:42 (TH @3)
*
* ----------------------------------------------------------------------
* @(4) Removes Period Two Spaces From Block
* ----------------------------------------------------------------------
* This macro removes 'period two spaces' from a marked block or a user
* selected block. If a block is marked before invoking this macro,
* either open or closed, it will be processed without pause. If no
* block is marked, the macro pauses for the user to select the block
* end by cursoring to end of desired block and pressing <enter>.
* Requires QEdit v2.15.
* Test. Test. Test
* Test. Test. Test
@4 macrobegin
* --------------------------- Select Block ---------------------------*
gotoblockend jtrue A markline gotoblockend jtrue OK pause jump B
A: gotoblockbeg unmarkblock markline prevposition
B: markline
OK: setscreenoff
* -------------------- Remove 'period two spaces' --------------------*
gotoblockbeg begline
findreplace "." " " return "." " " return "LN" return
unmarkblock
*
* 44 bytes Mon 05-18-1992 17:34:08 (TH @4)
*
* ----------------------------------------------------------------------
* @(5) Remove "Period Two Spaces" from Paragraph, Requires QEdit v2.15
* ----------------------------------------------------------------------
@5 macrobegin
setscreenoff savesettings setautoindentmode setsoundoff
cursordown prevpara begline
unmarkblock markcharacter endpara markcharacter gotoblockbeg
findreplace "." " " return "." " " return "LN" return *|
wrappara nextpara unmarkblock restoresettings
*
* 42 bytes Sun 12-08-1991 17:13:36 (TH @5, reformats after replacement)
* 42 bytes Sun 12-08-1991 17:13:36 (TH @5, to ALL #3/792)
* 38 bytes Wed 12-11-1991 22:49:00 (TH @5, shortened)
*
* ----------------------------------------------------------------------
* @(F3) Copy Character At Cursor To Line Below
* ----------------------------------------------------------------------
@F3 macrobegin cursordown getprev cursorleft
*
* 7 bytes Sun 07-28-1991 16:45:37 (TH @3)
*
* ----------------------------------------------------------------------
* @(F4) Insert Space At Cursor And Move Down To Next Line
* ----------------------------------------------------------------------
* Insert must be ON
@F4 macrobegin " " cursorleft cursordown
*
* 8 bytes Wed 09-05-1990 16:14:32
*
* ----------------------------------------------------------------------
* @(f5) Insert Space At Cursor And Move Down To Next Line
* ----------------------------------------------------------------------
* The macro operates independent of Insert status.
@F5 macrobegin splitline cursorright joinline cursordown cursorleft
*
* 9 bytes Mon 07-29-1991 14:10:35 (TH @F5)
*
* ----------------------------------------------------------------------
* @(F6) Deletes Char At Cursor And Move Down To Next Line
* ----------------------------------------------------------------------
@F6 macrobegin delch cursordown
*
* 6 bytes Tue 09-11-1990 09:40:22
*
* ------------------------------------------------
* @(f7) Block move, fills old block with blanks
* ------------------------------------------------
* Mark block as column or character block, not a line block. Move
* cursor to location to move block to, press @f7, and block is moved to
* new location. Old block is filled with spaces.
* This macro is a slight modification to a macro written by Tim Farley
* of SemWare (message #665/REGDOS conf). I changed "Paste" to PastOver"
* so all surrounding text position remains unchanged, and removed the test
* if block was cut to end macro.
@f7 MacroBegin
GotoBlockBeg * Get to block begin
JFalse END * If no block, end macro
Cut *ELSE Cut block to scrap
Paste * And paste it back where it was
PrevPosition * Move where new block will be
FillBlock " " Return * Fill old block with blanks
Pasteover * Paste old block to new loctn.
END: *
*
* 16 bytes Thu 02-28-1991 15:14:17